import React, { Component } from 'react'
import Child from './Child'
export default class Demo4 extends Component {
  constructor(){
    super()
    this.state={
        count:100
    }
  }
  render() {
    return (
      <div>
        <h1>{this.state.count}</h1>
        <button onClick={()=>this.setState({count:this.state.count+1})}>更新</button>
        <hr />
        <Child pcount={this.state.count}></Child>
      </div>
    )
  }
}
